﻿<!DOCTYPE html>
<html>
<!-- 履职职责落实情况结果 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <link href="../static/js/vue-treeselect/vue-treeselect.css" rel="stylesheet" />
    <script src="../static/js/vue-treeselect/vue-treeselect.js"></script>
    <style>
        body {
            padding-bottom: 10px;
        }

        .vue-treeselect_style .vue-treeselect__control {
            height: 100%;
            border: none;
            background: none;
        }

        .vue-treeselect__placeholder {
            top: -3px;
        }

        .vue-treeselect__single-value {
            top: -3px;
        }
    </style>
    <!-- 行内编辑 css-->
    <style>
        .tb-edit .el-input {
            display: none
        }

        .tb-edit .current-row .el-input {
            display: block
        }

        .tb-edit .current-row .el-input+span {
            display: none
        }

        .xian {
            display: block;
            text-align: center;
        }

        .yin {
            display: none;
            text-align: center;
        }

        .lineMust {
            position: absolute;
            right: 15px;
            bottom: 6px;
            bottom: 3px\0 !important;
            /* 兼容ie */
        }
    </style>
    <!-- 行内编辑 css-->
</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-col :span="24" align="center">
                    <el-form-item>
                        {{Form.years}}<label>年度&nbsp;&nbsp;管理人员安全履职能力评估计划&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    </el-form-item>
                </el-col>
            </el-row>


            <el-col :span="24">
                <el-form-item :label="PerformanceAssessPlan.AssessPurpose+mark.m" class="inputTextarea">
                    {{Form.assessPurpose}}
                </el-form-item>
            </el-col>

            <el-col :span="11">
                <el-form-item :label="PerformanceAssessPlan.AssessTime+mark.m" class="inputTextarea">
                    {{Form.assessTime}}
                </el-form-item>
            </el-col>

            <el-col :span="11">
                <el-form-item :label="PerformanceAssessPlan.AssessContent+mark.m" class="inputTextarea">
                    {{Form.assessContent}}
                </el-form-item>
            </el-col>

            <!--评估对象-->
            <el-col :span="5">
                <el-form-item :label="PerformanceAssessPlan.AssessObj+mark.m" class="inputTextarea">
                    {{Form.assessObj}}
                </el-form-item>
            </el-col>


            <el-col :span="6">
                <el-form-item label="" class="inputTextarea">
                </el-form-item>
            </el-col>


            <!--评估人数-->
            <el-col :span="5">
                <el-form-item label="评估人数:" class="inputTextarea">
                    {{'20'}}
                </el-form-item>
            </el-col>

            <!--负责人-->
            <!--<el-col :span="6">
        <el-form-item :label="this.formInline.model.chargePerson+mark.m" class="inputTextarea">
            {{formatter(Form.OverdueScope)}}
        </el-form-item>
    </el-col>-->
            <!--评审小组-->
            <el-col :span="24">
                <el-form-item :label="PerformanceAssessPlan.ReviewGroup+mark.m" class="inputTextarea">
                    {{Form.reviewGroup}}
                </el-form-item>
            </el-col>


            <!--评估方式-->
            <el-col :span="24">
                <el-form-item :label="PerformanceAssessPlan.AssessMethod+mark.m" class="inputTextarea">
                    {{Form.assessMethod}}
                </el-form-item>
            </el-col>

            <br />

            <el-row>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <div class="el-input--mini el-input-group">
                                <div class="el-input-group__prepend">
                                    评估结果:
                                </div>
                                <el-input class="el-textarea__inner" type="textarea" v-model="Form.assessResult"
                                    autocomplete="off"></el-input>
                            </div>
                        </el-form-item>
                    </div>
                </el-col>

            </el-row>


            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>-->
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog title="履职职责落实情况管理" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%"
            height="80%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        Vue.component('treeselect', VueTreeselect.Treeselect)
        var app = new Vue({
            el: '#app',
            data: {
                edit: true,
                readonly: true,
                //表单内容
                OverdueScope: [],
                ListItem: ListItem,
                situation: [],
                mydata: PersonInChargeTree,
                Region: myTree,
                //获取下拉菜单situation
                situation: [],
                formInline: {
                    model: {
                        name: '',
                        yeartime: '年度管理人员安全履职能力评估计划',
                        years: '',
                        assessPurpose: '',// "评估目的",
                        assessTime: '',// "评估时间",
                        assessContent: '',// "评估内容",
                        assessObj: '',// "评估对象",
                        reviewGroup: '',// "评审小组",
                        assessMethod: '',// "评估方式",
                        chargePerson: '负责人',//负责人
                        department: '',
                        evaluator: '',
                        post: '',
                        straightLine: '',
                        remarks: '',

                    },
                    offset: 0,
                    limit: 10
                },
                id: '',
                //获取下拉菜单situation
                situation: [],
                Participant: [],
                reviewGroup: [],
                //employmentLicenseList: [],
                value1: '',
                lsForm: {
                    department: '',
                    evaluator: '',
                    post: '',
                    straightLine: '',
                    remarks: '',
                },

                //获取下拉菜单
                classification: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    dutyName: '',
                    dutyMine: '',
                    situation: '',
                    date: '',
                    evaluation: '',
                    score: '',
                    name: '',
                    remarks: '',

                    years: '',
                    assessPurpose: '',// "评估目的",
                    assessTime: '',// "评估时间",
                    assessContent: '',// "评估内容",
                    assessObj: '',// "评估对象",
                    reviewGroup: null,// "评审小组",
                    assessMethod: '',// "评估方式",
                    Participant: null,
                    Unit: [],

                    department: '',
                    evaluator: '',
                    post: '',
                    straightLine: '',
                    remarks: '',
                    reviewGroupaaa: [],
                    employmentLicenseList: [],
                },
                //表单验证
                rules: {
                    //评审意见
                    assessResult: [
                        verification.NotNull
                    ],
                }

            },

            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },

                formatter: function (val) {
                    if (val) {
                        if (typeof val === 'string' || typeof val === 'number') {
                            return getTreeValue(this.mydata, val)
                        }
                        else {
                            var result = '';
                            for (var i = 0; i < val.length; i++) {
                                result += getTreeValue(this.mydata, val[i]) + '，';
                            }
                            result = result.substr(0, result.length - 1);
                            return result;
                        }
                    }
                },

                UserInput: function (val, id) {
                    this.Title = "被评估人管理"
                    DialogShow(this, val, "PerformanceAssessPlanInputAdd.html", id);
                },
                //排查部门input
                input: function (value) {
                    this.Form.Unit = value;
                },



                handblur: function () {
                    //this.$refs.table.setCurrentRow(999);
                    //console.log("c", 'c');
                },
                //table选中行handle
                tableHandleCurrentChange: function (currentRow) {
                    this.currSeelctId = currentRow.id;
                    this.currSeelctCell = currentRow;
                },




                //关闭Dialog 回调
                // closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/ManageSystemCategory/DeleteMuti'); },


                //提交数据
                onSubmitForm: function (formName) {
                    //alert(formName);
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {

                            onSubmitForm(this, '/api/DutiesAndResponsibilities/SBSave', mythis.Form);
                        } else {
                            //验证失败

                            return false;
                        }

                    });

                },

                getData: function () {
                    getData(this, '/api/DutiesAndResponsibilities/get?id=' + this.id);
                    //this.Form.situation = this.Form.situation + "";
                },
                //获取分页数据
                GetPageData: function (currentIndex) {
                    //GetPageData(this, currentIndex, '/api/DutiesAndResponsibilities/PGGetList')
                },
                //删除列表行
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                //Dialog展示
                //UserInput: function (val, id) { DialogShow(this, val, "DutiesAndResponsibilitiesInputPerson.html", id); },

                //以下是该input内的表格方法
                //表格数据格式化
                //getDicValue: function (row, column, cellValue, index) {
                //    switch (column.property) {
                //        case "Region":
                //            return getTreeValue(this.Region, cellValue)
                //            break;
                //        case "RiskLevel":
                //            return getDicValue('03', cellValue)
                //            break;
                //        default:
                //    }

                //},
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                this.situation = getDicData('n54');
                //初始化数据
                // this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                //绑定下拉和tree
                //this.Participant = fn(this.mydata, "0");
                this.reviewGroup = fn(this.mydata, "0");
                this.classification = getDicData('w66');
                this.OverdueScope = fn(this.mydata, "0");
            },

        });
    </script>
</body>

</html>